css: Rename function to _gtk_style_property_parse_value()
authorBenjamin Otte <otte@redhat.com>
Wed, 25 May 2011 23:01:44 +0000 (01:01 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 2 Jun 2011 00:03:50 +0000 (02:03 +0200)
... and take an optional style property as argument. This way, we can
allow custom parse functions for properties. The style property needs to
be optional so that we can use it for widget style properties, too.

gtk/gtkcssprovider.c
gtk/gtkstyleproperty.c
gtk/gtkstylepropertyprivate.h

index 1b3c12e0623129b68b21087dad802dcffb7566b0..5d35797f3e9e6bda39437ac26f95fa8156043c81 100644 (file)
@@ -1371,9 +1371,10 @@ gtk_css_provider_get_style_property (GtkStyleProvider *provider,
                                         gtk_css_provider_parser_error,
                                         provider);
 
-          found = _gtk_css_value_parse (value,
-                                        parser,
-                                        NULL);
+          found = _gtk_style_property_parse_value (NULL,
+                                                   value,
+                                                   parser,
+                                                   NULL);
 
           _gtk_css_parser_free (parser);
 
@@ -2122,9 +2123,10 @@ parse_declaration (GtkCssScanner *scanner,
         }
       else
         {
-          if (_gtk_css_value_parse (val,
-                                    scanner->parser,
-                                    gtk_css_scanner_get_base_url (scanner)))
+          if (_gtk_style_property_parse_value (property,
+                                               val,
+                                               scanner->parser,
+                                               gtk_css_scanner_get_base_url (scanner)))
             {
               if (_gtk_css_parser_begins_with (scanner->parser, ';') ||
                   _gtk_css_parser_begins_with (scanner->parser, '}') ||
index 9771eb5ebad9e4a787dddb9eb6a1d0d42d3d376f..7a0003d4f5e33ed3fc3f3474661502cb40906999 100644 (file)
@@ -1375,9 +1375,10 @@ css_string_funcs_init (void)
 }
 
 gboolean
-_gtk_css_value_parse (GValue       *value,
-                      GtkCssParser *parser,
-                      GFile        *base)
+_gtk_style_property_parse_value (const GtkStyleProperty *property,
+                                 GValue                 *value,
+                                 GtkCssParser           *parser,
+                                 GFile                  *base)
 {
   ParseFunc func;
 
index ba9fd3f4b323e4cd9b3cc30bee2fbdb6873bac6b..2fa772be3f709e3b7f447a7311be478a027d7b33 100644 (file)
@@ -56,9 +56,10 @@ void                     _gtk_style_property_pack          (const GtkStyleProper
                                                             GtkStateFlags           state,
                                                             GValue                 *value);
 
-gboolean                _gtk_css_value_parse              (GValue        *value,
-                                                           GtkCssParser  *parser,
-                                                           GFile         *base);
+gboolean                 _gtk_style_property_parse_value   (const GtkStyleProperty *property,
+                                                            GValue                 *value,
+                                                            GtkCssParser           *parser,
+                                                            GFile                  *base);
 void                     _gtk_style_property_print_value   (const GtkStyleProperty *property,
                                                             const GValue           *value,
                                                             GString                *string);